package com.mzy.concurrent;

/**
 * @Author: mizy3
 * @Date: 2024/08/24/下午9:49
 * @Description:
 */
public class TestThreadLocal {
    public static void main(String[] args) {
        new Thread(() -> {
            ThreadLocal<String> holder = new ThreadLocal<>();
            holder.set("mizeyu");

            System.out.println(111);

        }).start();

        new Thread(() -> {
            ThreadLocal<String> holder = new ThreadLocal<>();
            holder.set("qiumengfan");
            String s = holder.get();
            System.out.println(111);

        }).start();
    }
}
